from .celery import app


@app.task
def process_order(a, b):

    print(a)
    print(b)
    return '订单处理完了'


@app.task
def cancel_order():
    import random
    res = random.choice([1, 0])
    if res == 0:
        print('订单状态改了，取消订单了')
        return True
    else:
        print('订单取消失败')
        return False
